<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>虚拟银行系统 - 交易详情</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
  <link rel="stylesheet" href="/css/main.css">
  <style>
    /* Transaction detail specific styles */
    .transaction-detail-container {
      max-width: 700px;
      margin: 0 auto;
    }
    
    .transaction-status-banner {
      border-radius: var(--border-radius-lg);
      padding: var(--spacing-lg);
      margin-bottom: var(--spacing-lg);
      display: flex;
      align-items: center;
      color: white;
    }
    
    .transaction-status-banner.success {
      background-color: var(--success-color);
    }
    
    .transaction-status-banner.processing {
      background-color: var(--accent-color);
    }
    
    .transaction-status-banner.failed {
      background-color: var(--error-color);
    }
    
    .transaction-status-icon {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background-color: rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: var(--spacing-md);
      flex-shrink: 0;
    }
    
    .transaction-status-info {
      flex: 1;
    }
    
    .transaction-status-title {
      font-size: 18px;
      font-weight: 500;
      margin-bottom: 2px;
    }
    
    .transaction-status-desc {
      font-size: 14px;
      opacity: 0.8;
    }
    
    .transaction-amount-section {
      text-align: center;
      margin-bottom: var(--spacing-lg);
    }
    
    .transaction-amount-label {
      color: var(--light-text);
      margin-bottom: var(--spacing-xs);
    }
    
    .transaction-amount {
      font-size: 36px;
      font-weight: 500;
    }
    
    .transaction-amount.income {
      color: var(--success-color);
    }
    
    .transaction-amount.expense {
      color: var(--error-color);
    }
    
    .transaction-detail-section {
      margin-bottom: var(--spacing-lg);
    }
    
    .transaction-detail-title {
      font-weight: 500;
      margin-bottom: var(--spacing-sm);
      padding-bottom: var(--spacing-sm);
      border-bottom: 1px solid var(--divider-color);
    }
    
    .detail-item {
      display: flex;
      padding: var(--spacing-sm) 0;
    }
    
    .detail-label {
      width: 120px;
      color: var(--light-text);
    }
    
    .detail-value {
      flex: 1;
      word-break: break-all;
    }
    
    .transaction-actions {
      display: flex;
      justify-content: center;
      gap: var(--spacing-md);
      margin-top: var(--spacing-xl);
    }
    
    /* Loading state */
    .loading-container {
      padding: var(--spacing-xl) 0;
      text-align: center;
    }
    
    .loading-spinner {
      border: 3px solid var(--light-bg);
      border-top: 3px solid var(--primary-color);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: 0 auto var(--spacing-md);
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    /* Error state */
    .error-state {
      text-align: center;
      padding: var(--spacing-xl) 0;
      color: var(--light-text);
    }
    
    .error-state i {
      font-size: 48px;
      color: var(--error-color);
      margin-bottom: var(--spacing-md);
    }
    
    .qr-code-container {
      text-align: center;
      margin: var(--spacing-md) 0;
    }
    
    .qr-code {
      width: 200px;
      height: 200px;
      margin: 0 auto;
      padding: var(--spacing-md);
      border: 1px solid var(--divider-color);
      border-radius: var(--border-radius-md);
      background-color: white;
    }
    
    .share-text {
      margin: var(--spacing-sm) 0;
      font-size: 13px;
      color: var(--light-text);
    }
    
    @media (max-width: 768px) {
      .transaction-detail-container {
        padding: 0 var(--spacing-md);
      }
    }
  </style>
</head>
<body>
  <div class="app-wrapper">
    <!-- Top Navigation Bar -->
    <div id="top-navbar"></div>
    
    <div class="main-container">
      <!-- Sidebar -->
      <div id="sidebar"></div>
      
      <!-- Main Content -->
      <div class="content">
        <div class="page-header">
          <div class="page-title">交易详情</div>
          <div class="breadcrumb">
            <a href="/index.html">首页</a>
            <i class="fas fa-angle-right"></i>
            <a href="/transactions.html">交易记录</a>
            <i class="fas fa-angle-right"></i>
            <span>交易详情</span>
          </div>
        </div>
        
        <div class="transaction-detail-container" id="transaction-detail-content">
          <div class="loading-container">
            <div class="loading-spinner"></div>
            <div>加载中，请稍候...</div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- Scripts -->
  <script src="/js/utils/Utils.js"></script>
  <script src="/js/components/Toast.js"></script>
  <script src="/js/services/ApiService.js"></script>
  <script src="/js/components/TopNavBar.js"></script>
  <script src="/js/components/SideBar.js"></script>
  <script src="/js/pages/transaction-detail.js"></script>
</body>
</html>
